#import "CocoaClass.h"

@implementation CocoaClass

- (id) initWithName: (NSString*) name
{
	self = [super init];
	_class = NSClassFromString(name);
	if(!_class)
	{
		[self dealloc];
		return nil;
	}
	return self;
}

- (id) initWithClass: (Class) klass
{
	self = [super init];
	_class = klass;
	return self;
}

- (void) dealloc
{
	[super dealloc];
}

- (Class) klass
{
	return _class;
}

- (BOOL) isEqual: (id) obj
{
	return ([obj isKindOfClass: [CocoaClass class]]
		&& ((CocoaClass*) obj)->_class == self->_class);
}

- (NSString*) description
{
	return [_class description];
}

@end
